﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using AcctrueWMS.Foundation.DAL;

namespace AcctrueWMS.Foundation.Data
{
    public class WMSQLExpressionEvaler:IExpressionEvaler
    {
        public CommandExpressionTypeEnum ExpressionType
        {
            get { return CommandExpressionTypeEnum.WMSQL; }
        }

        public IDataModelContext Context
        {
            get;
            set;
        }
        public object Eval(string expr)
        {
            expr = Context.Render.Render(expr);
            return (WMSqlExcuter.ExecuteDataTable(expr) as object);
        }
    }
}
